//
//  RXFrameLogColor.h
//  RXFrame
//
//  Created by srxboys on 2021/4/21.
//

#import <Foundation/Foundation.h>

#if DEBUG
    #define RXLog(format, ...) RXLogger(NO, format, ##__VA_ARGS__)
    #define RXLogError(format, ...) RXLogger(YES, format, ##__VA_ARGS__)

    #define RXLogger(__isError,__format,  ...) [RXFrameLogColor printLog:__isError file:__FILE__ line:__LINE__ method:[NSString stringWithFormat:@"%s", __PRETTY_FUNCTION__] content:[NSString stringWithFormat:(__format), ##__VA_ARGS__]]
#else
    #define RXLog(...)
    #define RXLogError(...)
#endif

NS_ASSUME_NONNULL_BEGIN

@interface RXFrameLogColor : NSObject
+ (void)printLog:(BOOL)isError file:(char *)file line:(int)line method:(NSString *)method content:(NSString *)format;

+ (RXFrameLogColor *)shareLogColor;
@property (nonatomic, assign) BOOL enable; // default NO/false
@end

NS_ASSUME_NONNULL_END
